package controller;

import service.AtmService;
import util.MySpring;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class Deposit extends HttpServlet {
    AtmService atmService = MySpring.getBean("service.AtmService");

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("Deposit.service");
        String name8 = req.getParameter("name7");

        resp.setCharacterEncoding("UTF-8");
        PrintWriter out = resp.getWriter();
        out.write("<html>");
        out.write(" <head>");
        out.write("     <meta charset=\"UTF-8\">");
        out.write(" </head>");
        out.write(" <body>");
        out.write("    <form action=\"doDeposit\" method =\"post\">");
        out.write("     <input name=\"depositBalance1\" value=\"10\"/><br/>");
        out.write("         <input type=\"submit\" value=\"确定\">");
        out.write("     <input type= \"hidden\" name=\"name8\" value=\""+name8+"\"/><br/>");
        out.write("    </form>");
        out.write(" </body>");
        out.write("</html>");
        out.flush();
    }
}